//
//  FirstCell.m
//  Diary
//
//  Created by 泉  姜 on 16/6/25.
//  Copyright © 2016年 泉  姜. All rights reserved.
//

#import "FirstCell.h"

#define HEIGHT self.contentView.frame.size.height
#define WIDTH self.contentView.frame.size.width
@implementation FirstCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.timeImgView = [[UIImageView alloc] init];
        //        _timeImgView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_timeImgView];
        
        self.lineLabel = [[UILabel alloc] init];
        _lineLabel.backgroundColor = [UIColor blackColor];
        [self.contentView addSubview:_lineLabel];
        
        self.timeLabel = [[UILabel alloc] init];
        //        _timeLabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_timeLabel];
        
        self.diaryImgView = [[UIImageView alloc] init];
        //        _diaryImgView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_diaryImgView];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _timeImgView.frame = CGRectMake(WIDTH * (10 / 375.0), HEIGHT * (20 / 260.0), WIDTH * (20 / 375.0), WIDTH * (20 / 375.0));
    _lineLabel.frame = CGRectMake(WIDTH * (20 / 375.0), HEIGHT * (40 / 260.0), 1, HEIGHT * (230 / 260.0));
    _timeLabel.frame = CGRectMake(WIDTH * (40 / 375.0), HEIGHT * (10 / 260.0), WIDTH * (200 / 375.0), HEIGHT * (20 / 260.0));
    _diaryImgView.frame = CGRectMake(WIDTH * (40 / 375.0), HEIGHT * (50 / 260.0), WIDTH * (315 / 375.0), HEIGHT * (200 / 260.0));
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
